﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace S4Store.Domain.NetMarketingKpi
{
    public class NetMarketingMedia
    {
        public int Id { get; set; }
        public int StoreId { get; set; }
        public virtual Store Store { get; set; }

        public string Name { get; set; }
        public int TypeValue { get; set; }
        public bool IsClose { get; set; }

        [NotMapped]
        public MediaType Type
        {
            get { return TypeValue.ToEnum<MediaType>(); }
            set { TypeValue = value.ToInt(); }
        }

        [Flags]
        public enum MediaType
        {
            [Description("网站")]
            WebSite=1,

            [Description("移动媒体")]
            Mobile=2 
        }
    }
}
